package com.ruoyi.project.yuwen.yuwenaudio.domain;

import com.ruoyi.common.utils.SizeUtil;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 课文朗读对象 audio
 *
 * @author shixiangwen
 * @date 2021-02-24
 */
public class Audio extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 录音ID
     */
    private String vid;

    /**
     * 用户ID(后续加入主键才能根据uid分区)
     */
    private Long kkuid;

    /**
     * 状态(-4下架-删除,-2等待上传,1待审核,2已审核)
     */
    @Excel(name = "状态(-4下架-删除,-2等待上传,1待审核,2已审核)")
    private Integer vstatus;

    /**
     * 下载路径
     */
    @Excel(name = "下载路径")
    private String url;

    /**
     * 课文ID
     */
    @Excel(name = "课文ID")
    private Long kewenid;

    /**
     * 文件名
     */
    @Excel(name = "文件名")
    private String vname;

    private Date createTime;

    /**
     * 上传时间
     */
    @Excel(name = "上传时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date uploadTime;

    /**
     * 审核时间
     */
    @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date reviewTime;

    /**
     * 文件大小
     */
    @Excel(name = "文件大小")
    private Long size;

    /**
     * 审核者
     */
    @Excel(name = "审核者")
    private String checker;

    /**
     * 点赞数
     */
    @Excel(name = "点赞数")
    private Long praise;

    public void setVid(String vid) {
        this.vid = vid;
    }

    public String getVid() {
        return vid;
    }

    public void setKkuid(Long kkuid) {
        this.kkuid = kkuid;
    }

    public Long getKkuid() {
        return kkuid;
    }

    public void setVstatus(Integer vstatus) {
        this.vstatus = vstatus;
    }

    public Integer getVstatus() {
        return vstatus;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getUrl() {
        return url;
    }

    public void setKewenid(Long kewenid) {
        this.kewenid = kewenid;
    }

    public Long getKewenid() {
        return kewenid;
    }

    public void setVname(String vname) {
        this.vname = vname;
    }

    public String getVname() {
        return vname;
    }

    public String sizeFormat;

    public String getSizeFormat() {
        return SizeUtil.sizeFormat(size);
    }

    public void setSizeFormat(String sizeFormat) {
        this.sizeFormat = sizeFormat;
    }

    @Override
    public Date getCreateTime() {
        return createTime;
    }

    @Override
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUploadTime() {
        return uploadTime;
    }

    public void setUploadTime(Date uploadTime) {
        this.uploadTime = uploadTime;
    }

    public Date getReviewTime() {
        return reviewTime;
    }

    public void setReviewTime(Date reviewTime) {
        this.reviewTime = reviewTime;
    }

    public void setSize(Long size) {
        this.size = size;
    }

    public Long getSize() {
        return size;
    }

    public void setChecker(String checker) {
        this.checker = checker;
    }

    public String getChecker() {
        return checker;
    }

    public void setPraise(Long praise) {
        this.praise = praise;
    }

    public Long getPraise() {
        return praise;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("vid", getVid())
                .append("kkuid", getKkuid())
                .append("vstatus", getVstatus())
                .append("url", getUrl())
                .append("kewenid", getKewenid())
                .append("vname", getVname())
                .append("size", getSize())
                .append("checker", getChecker())
                .append("praise", getPraise())
                .toString();
    }
}
